<template>
  <div>示例演示：</div>
  <button @click="control">{{ btnName }}</button>
  <button @click="box = !box">box控制</button>
  <IsDragDialog v-model="show" closeShow fullShow>
    <template #head>我是头</template>
    <div>我是内容区域</div>
  </IsDragDialog>
  <!-- 关闭某些选项 -->
  <IsDragDialog
    style="top: 200px; left: 10px"
    v-model="box"
    :resize-able="false"
    drag-able
    closeShow
    fullShow
    width="100px"
    height="100px"
  />
</template>

<script lang="ts" setup>
import IsDragDialog from "@/components/IsDragDialog.vue"; //因为使用的是 script setup 这里组件会直接注册
import { computed } from "@vue/reactivity";
import { ref } from "vue";

const show = ref(true);
const box = ref(true);
const control = () => {
  show.value = !show.value;
};

const btnName = computed(() => {
  return show.value ? `关闭窗口` : `打开窗口`;
});
</script>

<style></style>
